/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2024-05-08
 * Time: 15:58
 */
class Date {
    //成员属性
    public int year;
    public int month;
    public int day;
    //成员方法
    public void setDay(int year, int month, int day){
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    @Override
    public String toString() {
        return "Date{" +
                "year=" + year +
                ", month=" + month +
                ", day=" + day +
                '}';
    }
}
public class Test02 {
    public static void main(String[] args) {
        // 构造三个日期类型的对象 d1 d2 d3
        Date d1 = new Date(2024,9,28);
        System.out.println(d1);//输出的是d1对象的地址值

    }
}
